package com.education.online.service.impl;

import com.education.common.utils.Convert;
import com.education.online.mapper.OPrapaUserBuyMapper;
import com.education.online.pojo.OPrapaUserBuy;
import com.education.online.service.OPrapaUserBuyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 用户购买备课共享资源 服务层实现
 *
 * @author d
 * @date 2020-06-09 15:06:12
 */
@Service
public class OPrapaUserBuyServiceImpl implements OPrapaUserBuyService {

    @Autowired
    private OPrapaUserBuyMapper oPrapaUserBuyMapper;

    //查询用户购买备课共享资源信息
    @Override
    public OPrapaUserBuy selectOPrapaUserBuyById(Integer id) {
        return oPrapaUserBuyMapper.selectOPrapaUserBuyById(id);
    }

    // 查询用户购买备课共享资源列表
    @Override
    public List<OPrapaUserBuy> selectOPrapaUserBuyList(OPrapaUserBuy oPrapaUserBuy) {
        return oPrapaUserBuyMapper.selectOPrapaUserBuyList(oPrapaUserBuy);
    }

    // 新增用户购买备课共享资源
    @Override
    public int insertOPrapaUserBuy(OPrapaUserBuy oPrapaUserBuy) {
        return oPrapaUserBuyMapper.insertOPrapaUserBuy(oPrapaUserBuy);
    }

    //修改用户购买备课共享资源
    @Override
    public int updateOPrapaUserBuy(OPrapaUserBuy oPrapaUserBuy) {
        return oPrapaUserBuyMapper.updateOPrapaUserBuy(oPrapaUserBuy);
    }

    //删除用户购买备课共享资源对象
    @Override
    public int deleteOPrapaUserBuyByIds(String ids) {
        return oPrapaUserBuyMapper.deleteOPrapaUserBuyByIds(Convert.toStrArray(ids));
    }
}